import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { UserService } from '../../service/user.service';
import { MgUser } from '../../domain/mguser';

@Component({
    moduleId: module.id,
    templateUrl: 'mguserInfo.component.html'
})
export class MguserInfoComponent implements OnInit {
    private title = "用户详情";
    private subTitle = "查看用户的详细信息";
    private mguser: MgUser = new MgUser();
    constructor(
        private route: ActivatedRoute,
        private userSvr: UserService
    ) { }

    async ngOnInit() {
        let id = +this.route.snapshot.params['id'];
        this.mguser = await this.userSvr.GetMgUserInfo(id);
    }
}